/*
 * Copyright (c)  小马哥. 2022-2024. All rights reserved.
 *
 */

package com.phsms.common.sensitive.demo.controller;

import cn.hutool.json.JSONUtil;
import com.phsms.common.sensitive.demo.entity.SensitiveEntity;
import com.phsms.common.sensitive.demo.service.SensitiveService;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.List;

/**
 * 敏感控制器
 *
 * @author Mar
 * @date 2023年1月10日
 */
@RestController
@RequestMapping("sensitive")
public class SensitiveController {

    @Resource
    private SensitiveService sensitiveService;

    @GetMapping("list")
    public String listData() {
        List<SensitiveEntity> sensitiveEntities = sensitiveService.listData();
        return JSONUtil.toJsonStr(sensitiveEntities);
    }
}
